function sayHi(){
    console.log('Hello',this.name);
}
var person2 ={
    name:'Christina',
    sayHi:sayHi
}

var person1 = {
    name :'YvetteLeu',
    friend:person2
}
// 当函数作为对象的时候，this指向对象，当前对象时person2
var obj=person1.friend;
obj.sayHi();
// person1.friend.sayHi();
